package com.mall.manager.controller;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import net.sf.json.JSONArray;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.util.WebUtils;

import com.mall.manager.FirstGardenStatistics.service.FirstGardenStatisticsService;
import com.mall.manager.service.DiffPeopleService;


/**
 * 全国人数分类统计信息控制层
 * @ClassName: DiffPeopleController
 * @Description: 
 * @author:wangwenyue wangwenyue@ide365.com
 * @date 2016年7月12日 下午2:17:59
 */
@RequestMapping("/manager")
@Controller
public class DiffPeopleController {
	@Resource
	private DiffPeopleService diffPeopleService;
	@Resource
	private FirstGardenStatisticsService fgss; 
	
	
	/**
	 * 用于地图展现
	 * @param request
	 * @return
	 */
	@RequestMapping("/diffqueryList")
	public String queryPage(HttpServletRequest request, ModelMap modelMap){
		Map<String, Object> paraMap = WebUtils.getParametersStartingWith(request, "");
		List<Map<String, Object>> list = diffPeopleService.queryList(paraMap);
		List<Map<String,Object>> manager_firstGarden_list = fgss.manager_firstGarden_list(null);
		modelMap.addAttribute("resList", String.valueOf(JSONArray.fromObject(list)));
		modelMap.addAttribute("timeList", String.valueOf(JSONArray.fromObject(manager_firstGarden_list)));
		return "view/kindergarten_message_map";
	}
	
	
}
